package chenjiuxu.seniorui

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import chenjiuxu.seniorui.view.AudioWaveView


class AudioWaveActivity : AppCompatActivity() {
    lateinit var audioWave: AudioWaveView
    var tag = true
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_audio_wave)
        audioWave = findViewById<AudioWaveView>(R.id.activity_audio_wave_awv)
    }

    override fun onWindowFocusChanged(hasFocus: Boolean) {
        super.onWindowFocusChanged(hasFocus)

        if (tag) {
            tag = false
            audioWave.startGetWaveData("/storage/emulated/0/1.aac")

        }

    }

}
